/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package uloha4.entities;

/**
 *
 * @author Tomique
 */
public class ComponentList extends MyList<Component> {

    private static ComponentList instance;

    private ComponentList() {
    }

    public static ComponentList getInstance() {
        if (instance == null) {
            instance = new ComponentList();
        }
        return instance;
    }
    
    public void select(boolean state) {
        for(Component<Node> comp : this) {
            comp.setVisible(state);
        }
    }

    public void selectInverse() {
        for(Component<Node> comp : this) {
            comp.setVisible(!comp.isVisible());
        }
    }
}
